#pragma once

#include "gameobject.h"
#include "HeatPhysics.h"
#include "../SGD Wrappers/SGD_Math.h"

class Water : public GameObject, public HeatPhysics
{
public:

	struct SlidingObject
	{
		GameObject* object;
		tVector2D current;
		tVector2D previous;
		float delta;
		bool gotDelta;
		int collided;
		bool wasMoved;
	};

private:

	static int iceCount;
	static int iceCounter;

	bool isFrozen;

	float slideSpeed;

	static vector<SlidingObject> slidingObjects;

public:

	//////////////////////////////////////////////////
	// 'Structor(s):
	Water();
	~Water(void);
	//************************************************

	//////////////////////////////////////////////////
	// GameObject Methods:
	void Update(float deltaTime)									override;
	void Render(void) const											override;
	void HandleCollision(GameObject& other, CollisionInfo& info)	override;
	void ResetToCheckPoint()										override;
	void SetCheckPointData()										override;
	//************************************************

	//////////////////////////////////////////////////
	// Accessors:
	inline bool IsFrozen(void) const { return isFrozen; }
	//************************************************

	void Freeze(void);
};

